
/* 
@deprecated
We recommend using the configureStore method of the @reduxjs/toolkit package, 
which replaces createStore.
*/
// import { createStore, applyMiddleware } from "redux";
// createStore
// ‌Redux的createStore方法在Redux 4.2版本中被弃用
import { applyMiddleware, createStore } from "redux4"; // redux 5.0.1 createStore 弃用
import { configureStore } from "@reduxjs/toolkit"; // redux 4.2以上用
import { thunk } from "redux-thunk";
// redux-devtools-extension
import { composeWithDevTools } from "@redux-devtools/extension";

import reducer from "./reducers";
// eslint@8.57.1


console.log(configureStore);
// configureStore // 用这个报错的！
// `reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers
// at configureStore 
// export default createStore(reducer, composeWithDevTools(applyMiddleware(thunk)));
export default createStore(reducer, composeWithDevTools(applyMiddleware(thunk)));